import time
import cv2
import usb


class Bot:

    def __init__(self, name):
        self.wname = name               #Name of the game window

    def Start(self):
        print(self.wname+' Starting...')
        # Video capture
        self.cap = cv2.VideoCapture(0)
        self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
        self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
        print('Video Capture Started')

        # 你的设备的VID和PID
        VID = 0x046D  # 替换为你的设备的VID
        PID = 0xC535  # 替换为你的设备的PID
        self.dev = usb.core.find(idVendor=VID, idProduct=PID)
        print(self.dev)



    def Run(self):
        print('Running...')
        while True:


            time.sleep(5)


    def Stop(self):
        pass
